﻿using Microsoft.CodeAnalysis;

namespace UIOC.CodeAnalysis.Diagnostics;

internal static class FileFieldAttributeRestrictionDiagnostic {

    public const string DiagnosticId = "UIOC0004";

    private const string Title = "'[FileFIeld]' 文件字段约束分析";
    private const string MessageFormat = "字段 '{0}' 是文件内部字段，禁止访问";
    private const string Description = "检测到使用标记了 '[FileField]' 的字段，此类字段禁止直接访问";
    private const string Category = "Usage";

    public static readonly DiagnosticDescriptor Rule = new(
        DiagnosticId,
        Title,
        MessageFormat,
        Category,
        DiagnosticSeverity.Error,
        isEnabledByDefault: true,
        description: Description
    );
}
